package com.example.administrator.x2picturetransliteration.Home.Activity;

import android.os.Bundle;
import android.support.annotation.Nullable;
import android.widget.ImageView;
import android.widget.TextView;

import com.example.administrator.x2picturetransliteration.Base.BaseActivity;
import com.example.administrator.x2picturetransliteration.Base.BasePresenter;
import com.example.administrator.x2picturetransliteration.Home.Presenter.Activity.SignInPresenter;
import com.example.administrator.x2picturetransliteration.R;

import butterknife.BindView;
import butterknife.OnClick;

/**
 * 协议说明
 * Created by Administrator on 2019/12/9.
 */

public class WCnmbActivity extends BaseActivity{

    @BindView(R.id.TitleText)TextView TitleText;
    @BindView(R.id.LButton)ImageView LButton;

    private SignInPresenter mSignInPresenter;

    @Override
    public int intiLayout() {
        return R.layout.home_cnmb;
    }

    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);

        TitleText.setText("协议说明");
        LButton.setImageResource(R.mipmap.home_backw);

        mSignInPresenter = new SignInPresenter(this,mCompositeSubscriptions);
    }


    /** 用户协议 */
    @OnClick(R.id.xysmText)
    public void xysmTextClick(){

        mSignInPresenter.Agreement("1",new BasePresenter.Callback() {
            @Override
            public void getData(Object data) {

                AgreementActivity.startAgreementActivity(WCnmbActivity.this,"用户协议",data + "");
            }
        });
    }

    /** 隐私政策 */
    @OnClick(R.id.yszcText)
    public void yszcTextClick(){

        mSignInPresenter.Agreement("2",new BasePresenter.Callback() {
            @Override
            public void getData(Object data) {

                AgreementActivity.startAgreementActivity(WCnmbActivity.this,"隐私政策",data + "");
            }
        });
    }

    @OnClick(R.id.left_button)
    public void left_buttonClick(){

        finish();
    }
}
